package com.ruitu.health_2.ui.common.util;

import com.ruitu.arad.util.SizeUtils;

// 处理视图的尺寸
public class ViewUtil {

    // 处理首页banner的尺寸
    public static int getHomeBannerHeight(int screenWidth) {
        return screenWidth * 1000 / 2000;
    }

    // 首页两张图(活动图和优惠券图)的尺寸 返回的数组存放[宽,高]
    public static int[] getHomeNewSpecial2Height(int screenWidth) {
        int width = (screenWidth - SizeUtils.dp2px(30)) / 2;
        int height = width * 300 / 600;
        int size[] = {width, height};
        return size;
    }

    // 商城模块首页三张图(活动图和优惠券图)的尺寸 返回的数组存放[宽,高]
    public static int[] getHomeNewSpecial3Height(int screenWidth) {
        int width = (screenWidth - SizeUtils.dp2px(40)) / 3;
        int height = width;
        int size[] = {width, height};
        return size;
    }

    // 处理模块banner的尺寸
    public static int getModelBannerHeight(int screenWidth) {
        return screenWidth * 1000 / 2000;
    }

    // 处理模块说明和引导图的尺寸
    public static int getModelGuidePicHeight(int screenWidth) {
        return screenWidth * 1000 / 2000;
    }
}
